#ifndef _USART_H_
#define _USART_H_

//===================================================头文件===================================================
#include "Header_file.h"  
#include "stm32f10x.h"  // Device header
#include "stdarg.h"
#include "stdio.h"
//===================================================变量声明===================================================
extern uint8_t Serial_RxData;
extern uint8_t Serial_RxFlag;
extern uint8_t Serial_usart1_RxData;
extern uint8_t Serial_usart1_RxFlag;
extern uint8_t Serial_usart2_RxData;
extern uint8_t Serial_usart2_RxFlag;
extern uint8_t Serial_usart3_RxData;
extern uint8_t Serial_usart3_RxFlag;
extern uint8_t Date_usart1_count;
extern uint8_t Date_usart1_array[5];
extern uint8_t Date_array[5];
extern uint16_t Obj_x,Obj_d;
//===================================================函数声明===================================================
void Usart_Init(void);
void USART1_SendDate(uint8_t Byte);
void USART1_SendArray(uint8_t *Array,uint8_t size);
void USART1_SendString(char *String);
void USART1_Printf(char *format,...);
void LED1_ON(void);
void LED1_OFF(void);
uint16_t Get_x(uint8_t date);
uint16_t Get_Date(uint8_t date);

void USART2_SendDate(uint8_t Byte);
void USART2_SendArray(uint8_t *Array,uint8_t size);
void USART2_SendString(char *String);
void USART2_Printf(char *format,...);
void USART2_SendEnd(void);
void USART2_SendSTx(uint8_t t_num);
void USART2_SendX(uint8_t date[5],uint8_t date_num);
void USART2_process(char date);
#endif

